<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"
    />
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <title>发现身边的灾害风险隐患</title>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <style>
      * {
        padding: 0;
        margin: 0;
        list-style: none;
        text-decoration: none;
      }
      html {
        font-size: 10px !important;
      }
      body {
        display: block;
        overflow: hidden;
      }
      div,
      img {
        user-select: none;
        -webkit-tap-highlight-color: transparent;
      }
      img:active {
        background-color: transparent;
      }
      /* 小屏设备 */
      @media (max-width: 600px) {
        html {
          font-size: 10px; /* 对于小屏设备，减小字体大小 */
        }
      }

      /* 中等屏幕设备 */
      @media (min-width: 601px) and (max-width: 1024px) {
        html {
          font-size: 14px; /* 对于中等屏幕设备，适度调整字体大小 */
        }
      }

      /* 大屏设备 */
      @media (min-width: 1025px) {
        html {
          font-size: 18px; /* 对于大屏设备，增大字体大小 */
        }
      }
    </style>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
    <script>
      window.wx = wx;
      const appid = "wx941907cf45112afa";
      const appSecret = "607beda39bcbfed666a678252af16746";
      axios
        .get(
          `/api/cgi-bin/token?grant_type=client_credential&appid=${appid}&secret=${appSecret}`
        )
        .then(function (response) {
          axios
            .get(
              `/api/cgi-bin/ticket/getticket?access_token=${response.data.access_token}&type=jsapi`
            )
            .then(function (res) {
              localStorage.setItem("ticket", res.data.ticket);
            });
        });
    </script>
  </body>
</html>
